package com.liujun.microserver.auth2.webjoin.server;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletContextInitializer;

/**
 * 1,授权启动类
 * 
 * 2,修改session中的key描述
 * 
 * @since 2018年6月24日 下午3:50:13
 * @version 0.0.1
 * @author liujun
 */
@SpringBootApplication
public class AuthCodeServerApplication implements ServletContextInitializer {

	public static void main(String[] args) {
		SpringApplication.run(AuthCodeServerApplication.class, args);
	}

	@Override
	public void onStartup(ServletContext servletContext) throws ServletException {
		// 修改session中的key的名称
		servletContext.getSessionCookieConfig().setName("client-session");
	}

}
